<?php
require_once(dirname(__FILE__)."/../config/session.php");
//require_once("yz.php");
require_once(dirname(__FILE__)."/../config/config.inc.php");
require_once(dirname(__FILE__)."/../libs/string/libstr.php");
require_once(dirname(__FILE__)."/../libs/dbclass/dbconn.php");
require_once(dirname(__FILE__)."/../libs/dbclass/dbservice.php");
require_once(dirname(__FILE__)."/../libs/login/login.php");
$mc=new libstr();
$db=new dbconn();
$dbs=new dbservice();
$lp=new login();




if($_POST["userno"]=="" || $_POST["password"]==""){
 	exit("userno or passoword is null");
 }
 
 	if($_POST["mc_code"]==""){
 	exit("mc_code is null");
 }
 $mb=$db->ds("select id,userid,userno,username,password,pic,mc_code from member_content where userno=".$_POST["userno"]." and password ='".$_POST["password"]."'");
 
 if(count($mb)==0)
	{
exit("userno or password is wrong");
	}
	
 $db->cmd("update member_content set mc_code='".$_POST["mc_code"]."' where userno=".$mb[0]["userno"]);
 echo "update is ok";



?>